#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>
int main()
{
	char ch[80] = "\0";
	char m[10] = "\0";
	int mid = 0;
	int j = 0;
	gets(ch);
	int len = strlen(ch);
	int i = 0;
	for (i = 0; i < len; i++)
	{
		if (ch[i] >= 'A' && ch[i] <= 'Z')
		{
			m[mid++] = ch[i];
		}
	}
	for (i = 0; i < mid; i++)
	{
		printf("%c\n", m[i]);
	}
	return 0;
}